package cn.tk.repository.mr;

import cn.tk.model.entity.mr.Variable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by denglw on 2021/8/3.<br/>
 * Desc: 变量 dao
 */
@Repository("mrVariableDao")
public interface VariableDao extends JpaRepository<Variable, Long> {

    /**
     * 获取所有有效变量.<br/>
     * @return list
     */
    @Override
    @Query(value = "select * from mr_variable where deleted=0 and disabled=0", nativeQuery = true)
    List<Variable> findAll();
}
